package main;

import java.io.File;

public class createFolder {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try{
		    String strDirectoy ="c:\\Users\\sl300\\Desktop\\test";
		    String strManyDirectories="c:\\Users\\sl300\\Desktop\\dir1/dir2/dir3";

		    // Create one directory
		    boolean success = (
		    new File(strDirectoy)).mkdir();
		    if (success) {
		      System.out.println("Directory: " 
		       + strDirectoy + " created");
		    }    
		    // Create multiple directories
		    success = (new File(strManyDirectories)).mkdirs();
		    if (success) {
		      System.out.println("Directories: " 
		     + strManyDirectories + " created");
		    }

		    }catch (Exception e){//Catch exception if any
		      System.err.println("Error: " + e.getMessage());
		    }
		 sl300   
	}

}
